named pipes or files on disk?

named pipes or files on disk?

am 20.04.2010 00:53:37 von Jer A

--===============0657027305==
Content-Type: multipart/alternative;
boundary="_62ae9397-d8bc-4e2d-aa76-289a4cc63aeb_"

--_62ae9397-d8bc-4e2d-aa76-289a4cc63aeb_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable



All=2C


I am new to the concept of named pipes on unix/linux


by using=20
use Fcntl=3B

will the named pipe transaction be faster than reading a file off the hd?

I am thinking a writing a daemon cron process=2C which a cgi process can at=
tach to
and read from memory=2C instead of file.



I dont want to use mod_perl.


Thanks in advance for your input.

Jeremy


=20
____________________________________________________________ _____
Videos that have everyone talking! Now also in HD!
http://go.microsoft.com/?linkid=3D9724465=

--_62ae9397-d8bc-4e2d-aa76-289a4cc63aeb_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable







All=2C


I am new to the concept of named pipes on unix/linux<=
br>

by using

use Fcntl=3B

w=
ill the named pipe transaction be faster than reading a file off the hd? >
I am thinking a writing a daemon cron process=2C which a cgi process c=
an attach to
and read from memory=2C instead of file.



I d=
ont want to use mod_perl.


Thanks in advance for your input.
<=
br>Jeremy




Videos that have everyon=
e talking! Now also in HD! 4460' target=3D'_new'>MSN.ca Video.
=

--_62ae9397-d8bc-4e2d-aa76-289a4cc63aeb_--

--===============0657027305==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============0657027305==--

RE: named pipes or files on disk?

am 21.04.2010 11:56:55 von Brian Raven

From: activeperl-bounces@listserv.ActiveState.com
[mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of Jer A
Sent: 19 April 2010 23:54
To: activeperl@listserv.activestate.com
Subject: named pipes or files on disk?

> All,
>
> I am new to the concept of named pipes on unix/linux
>
> by using
> use Fcntl;
> will the named pipe transaction be faster than reading a file off the
hd?
> I am thinking a writing a daemon cron process, which a cgi process can
attach to
> and read from memory, instead of file.
> I dont want to use mod_perl.

This smells a bit like an XY problem (see
), and I can't
immediately see what Fcntl has to do with pipes, named or otherwise. It
might help if we had more information about what you are trying to
accomplish. In any event, you might want to consider other IPC
mechanisms before pipes, like shared memory or sockets.

Also, bear in mind that if you are not using mod_perl, your CGI script,
and the Perl interpreter, will be read from disk for every request.
Unless reading that data file is time consuming for some reason (e.g. it
is huge, or remote), speeding it up may not improve the response time
for your HTTP request by very much.

HTH

--
Brian Raven

Please consider the environment before printing this email.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

RE: named pipes or files on disk?

am 21.04.2010 23:47:16 von Jer A

--===============0426813176==
Content-Type: multipart/alternative;
boundary="_a26654f3-45a1-4b83-bfd3-5898a7a3fcc6_"

--_a26654f3-45a1-4b83-bfd3-5898a7a3fcc6_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable



will accessing a html file=2C that is in the memory of a daemon=2C load as =
fast/faster
when accessed by the cgi script=2C through sockets?=2C than if the file was=
on disk?


Jeremy


> Subject: RE: named pipes or files on disk?
> Date: Wed=2C 21 Apr 2010 10:56:55 +0100
> From: BRaven@nyx.com
> To: activeperl@listserv.activestate.com
>=20
>=20
> From: activeperl-bounces@listserv.ActiveState.com
> [mailto:activeperl-bounces@listserv.ActiveState.com] On Behalf Of Jer A
> Sent: 19 April 2010 23:54
> To: activeperl@listserv.activestate.com
> Subject: named pipes or files on disk?
>=20
> > All=2C
> >=20
> > I am new to the concept of named pipes on unix/linux
> >=20
> > by using=20
> > use Fcntl=3B
> > will the named pipe transaction be faster than reading a file off the
> hd?
> > I am thinking a writing a daemon cron process=2C which a cgi process ca=
n
> attach to
> > and read from memory=2C instead of file.
> > I dont want to use mod_perl.
>=20
> This smells a bit like an XY problem (see
> )=2C and I can't
> immediately see what Fcntl has to do with pipes=2C named or otherwise. It
> might help if we had more information about what you are trying to
> accomplish. In any event=2C you might want to consider other IPC
> mechanisms before pipes=2C like shared memory or sockets.
>=20
> Also=2C bear in mind that if you are not using mod_perl=2C your CGI scrip=
t=2C
> and the Perl interpreter=2C will be read from disk for every request.
> Unless reading that data file is time consuming for some reason (e.g. it
> is huge=2C or remote)=2C speeding it up may not improve the response time
> for your HTTP request by very much.
>=20
> HTH
>=20
> --=20
> Brian Raven=20
>=20
> Please consider the environment before printing this email.
>=20
> This e-mail may contain confidential and/or privileged information. If yo=
u are not the intended recipient or have received this e-mail in error=2C p=
lease advise the sender immediately by reply e-mail and delete this message=
and any attachments without retaining a copy.
>=20
> Any unauthorised copying=2C disclosure or distribution of the material in=
this e-mail is strictly forbidden.
>=20
> _______________________________________________
> ActivePerl mailing list
> ActivePerl@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
=20
____________________________________________________________ _____
Hotmail & Messenger. Get them on your phone now.
http://go.microsoft.com/?linkid=3D9724463=

--_a26654f3-45a1-4b83-bfd3-5898a7a3fcc6_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable







will accessing a html file=2C that is in the memory of a daemon=2C load=
as fast/faster
when accessed by the cgi script=2C through sockets?=2C t=
han if the file was on disk?


Jeremy


>=3B Subject: R=
E: named pipes or files on disk?
>=3B Date: Wed=2C 21 Apr 2010 10:56:5=
5 +0100
>=3B From: BRaven@nyx.com
>=3B To: activeperl@listserv.ac=
tivestate.com
>=3B
>=3B
>=3B From: activeperl-bounces@list=
serv.ActiveState.com
>=3B [mailto:activeperl-bounces@listserv.ActiveSt=
ate.com] On Behalf Of Jer A
>=3B Sent: 19 April 2010 23:54
>=3B T=
o: activeperl@listserv.activestate.com
>=3B Subject: named pipes or fi=
les on disk?
>=3B
>=3B >=3B All=2C
>=3B >=3B
>=3B=
>=3B I am new to the concept of named pipes on unix/linux
>=3B >=
=3B
>=3B >=3B by using
>=3B >=3B use Fcntl=3B
>=3B >=
=3B will the named pipe transaction be faster than reading a file off the r>>=3B hd?
>=3B >=3B I am thinking a writing a daemon cron process=
=2C which a cgi process can
>=3B attach to
>=3B >=3B and read f=
rom memory=2C instead of file.
>=3B >=3B I dont want to use mod_perl=
..
>=3B
>=3B This smells a bit like an XY problem (see
>=3B =
<=3Bhttp://www.perlmonks.org/index.pl?node_id=3D542341>= 3B)=2C and I ca=
n't
>=3B immediately see what Fcntl has to do with pipes=2C named or o=
therwise. It
>=3B might help if we had more information about what you=
are trying to
>=3B accomplish. In any event=2C you might want to cons=
ider other IPC
>=3B mechanisms before pipes=2C like shared memory or s=
ockets.
>=3B
>=3B Also=2C bear in mind that if you are not using=
mod_perl=2C your CGI script=2C
>=3B and the Perl interpreter=2C will =
be read from disk for every request.
>=3B Unless reading that data fil=
e is time consuming for some reason (e.g. it
>=3B is huge=2C or remote=
)=2C speeding it up may not improve the response time
>=3B for your HT=
TP request by very much.
>=3B
>=3B HTH
>=3B
>=3B -- <=
br>>=3B Brian Raven
>=3B
>=3B Please consider the environment=
before printing this email.
>=3B
>=3B This e-mail may contain c=
onfidential and/or privileged information. If you are not the intended reci=
pient or have received this e-mail in error=2C please advise the sender imm=
ediately by reply e-mail and delete this message and any attachments withou=
t retaining a copy.
>=3B
>=3B Any unauthorised copying=2C disclo=
sure or distribution of the material in this e-mail is strictly forbidden.<=
br>>=3B
>=3B _______________________________________________
>=
=3B ActivePerl mailing list
>=3B ActivePerl@listserv.ActiveState.com r>>=3B To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
=


Stay in touch. ?linkid=3D9724458' target=3D'_new'>Get Hotmail & Messenger on your phone. a>
=

--_a26654f3-45a1-4b83-bfd3-5898a7a3fcc6_--

--===============0426813176==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============0426813176==--

Re: named pipes or files on disk?

am 22.04.2010 10:33:40 von Angelos Karageorgiou

This is a multi-part message in MIME format.
--===============0382460804==
Content-Type: multipart/alternative;
boundary="------------070902030407070705010802"

This is a multi-part message in MIME format.
--------------070902030407070705010802
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

On 22/4/2010 12:47 ??, Jer A wrote:
>
> will accessing a html file, that is in the memory of a daemon, load as
> fast/faster
> when accessed by the cgi script, through sockets?, than if the file
> was on disk?
>
>
> Jeremy
Well, if the file is on disk , and it has been accessed before, chances
are that it is cached in system memory,
so accessing it would be tremendously fast. Now If you do not want to
play the probability game, or are using
a system with a more reasonable caching system that Linux's then you are
much better off by using memcached, i.e. a daemon.

Btw, accessing a file residing inside a daemon is done via sockets !

--------------070902030407070705010802
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit




http-equiv="Content-Type">



On 22/4/2010 12:47 πμ, Jer A wrote:

type="cite">
content="text/html; charset=iso-8859-1">


will accessing a html file, that is in the memory of a daemon, load as
fast/faster

when accessed by the cgi script, through sockets?, than if the file was
on disk?





Jeremy


Well, if the file is on disk , and it has been accessed before, chances
are that it is cached in system memory,

so accessing it would be tremendously fast. Now If you do not want to
play the probability game, or are using

a system with a more reasonable caching system that Linux's then you
are much better off by using memcached, i.e. a daemon.



Btw, accessing a file residing inside a daemon is done via sockets !




--------------070902030407070705010802--

--===============0382460804==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============0382460804==--

RE: named pipes or files on disk?

am 22.04.2010 11:22:32 von Brian Raven

From: Jer A [mailto:jeremygwa@hotmail.com]
Sent: 21 April 2010 22:47
To: Brian Raven; activeperl@listserv.activestate.com
Subject: RE: named pipes or files on disk?

> will accessing a html file, that is in the memory of a daemon, load as
fast/faster
> when accessed by the cgi script, through sockets?, than if the file
was on disk?

It depends, but probably. Sockets are a common way of communicating with
daemons. However, you haven't mentioned why you think you need to speed
up access to this file.

--
Brian Raven

Please consider the environment before printing this email.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

RE: named pipes or files on disk?

am 23.04.2010 05:55:11 von Jer A

--===============1466293898==
Content-Type: multipart/alternative;
boundary="_24e068fa-8d52-4303-9651-2b033bfcb9f7_"

--_24e068fa-8d52-4303-9651-2b033bfcb9f7_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable



It is for cache purposes. I don't want to be writing hundreds of compiled p=
ages to disk=2C and I need a solution that does not depend on a database...=
so that is why I've chosen to write a daemon.

Jeremy



> Subject: RE: named pipes or files on disk?
> Date: Thu=2C 22 Apr 2010 10:22:32 +0100
> From: BRaven@nyx.com
> To: jeremygwa@hotmail.com=3B activeperl@listserv.activestate.com
>=20
> From: Jer A [mailto:jeremygwa@hotmail.com]=20
> Sent: 21 April 2010 22:47
> To: Brian Raven=3B activeperl@listserv.activestate.com
> Subject: RE: named pipes or files on disk?
>=20
> > will accessing a html file=2C that is in the memory of a daemon=2C load=
as
> fast/faster
> > when accessed by the cgi script=2C through sockets?=2C than if the file
> was on disk?
>=20
> It depends=2C but probably. Sockets are a common way of communicating wit=
h
> daemons. However=2C you haven't mentioned why you think you need to speed
> up access to this file.
>=20
> --=20
> Brian Raven=20
>=20
> Please consider the environment before printing this email.
>=20
> This e-mail may contain confidential and/or privileged information. If yo=
u are not the intended recipient or have received this e-mail in error=2C p=
lease advise the sender immediately by reply e-mail and delete this message=
and any attachments without retaining a copy.
>=20
> Any unauthorised copying=2C disclosure or distribution of the material in=
this e-mail is strictly forbidden.
>=20
=20
____________________________________________________________ _____
Live connected. Get Hotmail & Messenger on your phone.
http://go.microsoft.com/?linkid=3D9724462=

--_24e068fa-8d52-4303-9651-2b033bfcb9f7_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable







It is for cache purposes. I don't want to be writing hundreds of compil=
ed pages to disk=2C and I need a solution that does not depend on a databas=
e...so that is why =3B I've chosen to write a daemon.

Jeremy
=



>=3B Subject: RE: named pipes or files on disk?
>=3B Dat=
e: Thu=2C 22 Apr 2010 10:22:32 +0100
>=3B From: BRaven@nyx.com
>=
=3B To: jeremygwa@hotmail.com=3B activeperl@listserv.activestate.com
>=
=3B
>=3B From: Jer A [mailto:jeremygwa@hotmail.com]
>=3B Sent: =
21 April 2010 22:47
>=3B To: Brian Raven=3B activeperl@listserv.active=
state.com
>=3B Subject: RE: named pipes or files on disk?
>=3B r>>=3B >=3B will accessing a html file=2C that is in the memory of a da=
emon=2C load as
>=3B fast/faster
>=3B >=3B when accessed by the=
cgi script=2C through sockets?=2C than if the file
>=3B was on disk?<=
br>>=3B
>=3B It depends=2C but probably. Sockets are a common way o=
f communicating with
>=3B daemons. However=2C you haven't mentioned wh=
y you think you need to speed
>=3B up access to this file.
>=3B <=
br>>=3B --
>=3B Brian Raven
>=3B
>=3B Please consider t=
he environment before printing this email.
>=3B
>=3B This e-mail=
may contain confidential and/or privileged information. If you are not the=
intended recipient or have received this e-mail in error=2C please advise =
the sender immediately by reply e-mail and delete this message and any atta=
chments without retaining a copy.
>=3B
>=3B Any unauthorised cop=
ying=2C disclosure or distribution of the material in this e-mail is strict=
ly forbidden.
>=3B


Got a phone?
=3D'http://go.microsoft.com/?linkid=3D9724457' target=3D'_new'>Get Hotmail =
& Messenger for mobile!

=

--_24e068fa-8d52-4303-9651-2b033bfcb9f7_--

--===============1466293898==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============1466293898==--

RE: named pipes or files on disk?

am 23.04.2010 13:11:50 von Brian Raven

From: Jer A [mailto:jeremygwa@hotmail.com]
Sent: 23 April 2010 04:55
To: Brian Raven; activeperl@listserv.activestate.com
Subject: RE: named pipes or files on disk?

> It is for cache purposes. I don't want to be writing hundreds of
compiled pages to disk, and I need a > solution that does not depend on
a database...so that is why I've chosen to write a daemon.

That doesn't really answer my question (i.e. what advantage do you
expect a daemon to give you over the simply reading files from disk?),
but it does add a couple of additional snippets, namely "hundreds of
compiled pages" and "not depend on a database".

--
Brian Raven

Please consider the environment before printing this email.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy.

Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs